package com.sq.partner.manager.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sq.partner.manager.dao.IGatewayRoleMenuDao;
import com.sq.partner.manager.mybatis.model.GatewayRoleMenu;
import com.sq.partner.manager.service.IGatewayRoleMenuService;
@Service
public class GatewayRoleMenuServiceImpl implements IGatewayRoleMenuService {
	@Resource
	private IGatewayRoleMenuDao rm;
	@Override
	public boolean addMenusForRole(GatewayRoleMenu roleMenu) throws Exception {
		return rm.addMenusForRole(roleMenu);
	}

	@Override
	public boolean delRoleMenusForRole(Long roleId) throws Exception {
		return rm.delMenusForRole(roleId);
	}
	
	@Override
	public boolean delRoleMenusForMenu(Long menuId) throws Exception {
		return rm.delMenusForMenu(menuId);
	}

	@Override
	public List<GatewayRoleMenu> queryAllMenusOfCurRole(GatewayRoleMenu rolemenu)
			throws Exception {
		return rm.queryAllMenusOfCurRole(rolemenu);
	}

}
